'use strict'

function dictRouting($stateProvider){
    $stateProvider.state('dict', {
        url: '/',
        template: require('./dict.html'),
        controller: 'DictController as dict',
        resolve: {
            loadDictController: ($q, $ocLazyLoad) => {
                return $q((resolve) => {
                    require.ensure([], () => {
                        let module = require('./dict.index');
                        $ocLazyLoad.load({name:module.name});
                        resolve(module.controller);
                    });
                })
            }
        }
    })
}

export default angular.module('dict.routing', []).config(dictRouting).name;